<template>
  <div class="el-empty">
    <div class="el-empty__image">
      <img src="@/assets/images/empty-node.png" alt="" v-if="image == 'default'">
      <img src="@/assets/images/empty-image-error.png" alt="" v-if="image == 'error'">
      <img src="@/assets/images/custom-empty-image.png" alt="" v-if="image == 'empty'">
    </div>
    <div class="el-empty__description">{{text}}</div>
  </div>
</template>

<script>
  export default {
    props: {
      text: {
        type: String | Number,
        default: '描述文字'
      },
      image: {
        type: String,
        default: 'default'
      }
    }
  }
</script>

<style lang="scss" scoped>
  .el-empty{
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    padding: 32px 0;
    .el-empty__image{
      width: 160px;
      height: 160px;
      img{
        height: 100%;
        width: 100%;
      }
    }
    .el-empty__description{
      margin-top: 16px;
      padding: 0 60px;
      color: #969799;
      font-size: 14px;
      line-height: 20px;
    }
  }
</style>
